﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace Batty
{
    public class ScoreScreen : GameScreen
    {
        private Texture2D score;
        private double time;
        public ScoreScreen(Pondhawk game)
            : base(game)
        {
        }
        public override void LoadContent()
        {
            score = Game.Content.Load<Texture2D>("scorescreen");
        }
        public override void Activate()
        {
            base.Activate();
            time = 0;
        }
        public override void Update(Microsoft.Xna.Framework.GameTime gameTime)
        {
            base.Update(gameTime);
            time += gameTime.ElapsedGameTime.TotalSeconds;
            if (time > 3)
            {
                Game.SetScreen(Pondhawk.GameScreens.Batty);
            }
        }
        public override void DrawSprites(GameTime gameTime, SpriteBatch spriteBatch)
        {
            int wid = Game.Graphics.GraphicsDevice.Viewport.Width;
            int hit = Game.Graphics.GraphicsDevice.Viewport.Height;
            int imgWid = (int)((16.0 / 9.0) * hit);
            int tooWide = (imgWid - wid);
            Rectangle rect = new Rectangle(-tooWide / 2, 0, imgWid, hit);
            spriteBatch.Draw(score, rect, Color.White);
        }
    }
}
